<template>
	<div class="sysPageOptionConfigColumnsaveConfig-container">
		
	</div>
</template>
<style scoped>
	:deep(.el-select),
	:deep(.el-input-number) {
		width: 100%;
	}
</style>
<script lang="ts" setup>
	import { ref, onMounted } from "vue";
	import { ElMessage } from "element-plus";
	import type { FormRules } from "element-plus";
  import request from '/@/utils/request';

	//父级传递来的参数
	var props = defineProps({
		title: {
			type: String,
			default: "",
		},
	});
	//父级传递来的函数，用于回调
	const emit = defineEmits(["reloadTable"]);
	let mianPageData = ref<any>();
	
	
	// 打开弹窗
	const commentClick =async (columns : any,config:any) => {
		let postData=[];
		mianPageData.value = columns
		if(columns.value!=undefined && columns.value.length >0){
			postData = columns.value
		}else{
			postData = [columns]
		}
		config.column = postData;
		
		let url=`api/sysPageOptionConfig/saveWithChildren`;
		var res = await request({url: url,method: 'post',data:config });
		emit("reloadTable");
	};
	// // 提交
	// const submit = async () => {
	
	// 	let url=`api/sysPageOptionConfig/Update`;
	// 	var res = await request({url: url,method: 'get'});
	
	// };

	//将属性或者函数暴露给父组件
	defineExpose({ commentClick });
</script>